Skip to content

Conversation

jserv
Copy link
Contributor

@jserv jserv commented Oct 8, 2025

This introduces headless mode for menuconfig to enable non-interactive configuration in CI/CD pipelines. This allows menuconfig to load configs without requiring a terminal or curses interface.

jserv added 2 commits October 8, 2025 16:53
This introduces headless mode for menuconfig to enable non-interactive
configuration in CI/CD pipelines. This allows menuconfig to load configs
without requiring a terminal or curses interface.
This fixes regression in headless mode test that caused Windows CI/CD to
fail with IndentationError. It replaces python -c multi-line string with
heredoc to eliminate YAML indentation issues.

Problem:
- YAML run: | preserves leading whitespace from indentation
- Multi-line Python code in -c had leading spaces on each line
- Python interpreter rejected code with unexpected indent
- Error: "Process completed with exit code 1" on Windows

Root cause:
  python -c "
  from kconfiglib import Kconfig    # ← Leading spaces from YAML
  import menuconfig                  # ← Causes IndentationError
  ...
  "

Solution:
- Use heredoc (python << 'EOF') instead of python -c
- Heredoc is the standard bash method for multi-line input
- Python receives clean code from stdin without leading spaces
- Maintains code readability with proper formatting

  python << 'EOF'
  from kconfiglib import Kconfig
  import menuconfig
  ...
  EOF
@jserv jserv merged commit d2f3f7b into main Oct 8, 2025
9 checks passed
@jserv jserv deleted the headless branch October 8, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant